C1.LiveLinq.Indexing Namespace > IndexDefinition<T> Class : KeyIsUnique Property |
'Declaration
Public ReadOnly Property KeyIsUnique As System.Boolean
public System.bool KeyIsUnique {get;}
A unique index occupies less memory and performs better than a non-unique index (although the difference isn't dramatic). Therefore, for unique keys, it's recommended to specify the corresponding index as unique in the IndexCollection.Add method.
But do that only if you are sure that the key is indeed unique, as it imposes a uniqueness constraint on the collection. An attempt to modify the collection violating the uniqueness throws an System.InvalidOperationException.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2